package com.kaishengit.util;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private HibernateUtil() {
	}

	private static Configuration cfg = new Configuration();
	private static SessionFactory factory;
	static {
		factory = cfg.configure().buildSessionFactory();
	}

	public static Session getSession() {
		return factory.getCurrentSession();
	}
}
